package com.zzq.my.jetpacks.jectpackapp.ui.act

import android.view.View
import by.kirich1409.viewbindingdelegate.viewBinding
import com.aisier.architecture.base.BaseActivity
import com.zzq.my.jetpacks.jectpackapp.R
import com.zzq.my.jetpacks.jectpackapp.adapter.MulitEditsAdapter
import com.zzq.my.jetpacks.jectpackapp.adapter.MyAdapter
import com.zzq.my.jetpacks.jectpackapp.bean.MulitEditItemInfo
import com.zzq.my.jetpacks.jectpackapp.databinding.ActivityRvMulitEditsBinding

/**
 * 描述：RecycleView使用EditText的数据和焦点错乱问题解决方案
 * 作者：zhuangzeqin
 * 时间: 2022/1/18-17:04
 * 邮箱：zzq@eeepay.cn
 * 备注:
 */
class RvMuliteEditsActivity : BaseActivity(R.layout.activity_rv_mulit_edits),View.OnClickListener{
    private val binding by viewBinding(ActivityRvMulitEditsBinding::bind)
    private lateinit var adapter: MulitEditsAdapter//koltlin 实现方式
    private lateinit var adapter2: MyAdapter//java 的实现方式
    /**
     * 初始化数据
     */
    override fun initData() {
    }

    /**
     * 初始化操作
     */
    override fun initView() {
        val listData  = mutableListOf<MulitEditItemInfo>()
        for (i in 0 until 50)
        {
            listData.add(MulitEditItemInfo(id = i, name = "T$i"))
        }
        adapter = MulitEditsAdapter()
        adapter2 = MyAdapter(listData)
        adapter.setList(listData)
        binding.recycleview.adapter = adapter
    }

    /**
     * 初始化点击事件操作
     */
    override fun eventOnClick() {

    }

    override fun onClick(v: View) {

    }

}